package com.rayson.yututu.model.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author: rayson
 * Description: 空间类型枚举
 * Date: 2025-01-18 19:38
 */
@Getter
@AllArgsConstructor
public enum SpaceTypeEnum {

    PRIVATE_SPACE("私有空间", 0),
    TEAM_SPACE("团队空间", 1),
    ;

    private final String name;
    private final Integer value;

    public static SpaceTypeEnum getEnumByValue(Integer value) {
        for (SpaceTypeEnum spaceTypeEnum : SpaceTypeEnum.values()) {
            if (spaceTypeEnum.getValue().equals(value)) {
                return spaceTypeEnum;
            }
        }
        return null;
    }

}
